Ext.create('HelloWorld.view.gps');
Ext.define('HelloWorld.view.Main', {
        extend: 'Ext.tab.Panel',
        xtype: 'main',
        requires: [
                'Ext.Toolbar',
                'Ext.TitleBar',
                'Ext.Video'
        ],
        config: {
                tabBarPosition: 'bottom',
                items: [
                        {
                                title: 'Welcome',
                                iconCls: 'home',
                                styleHtmlContent: true,
                                scrollable: true,
                                items: {
                                        docked: 'top',
                                        xtype: 'titlebar',
                                        title: 'Welcome to Sencha Touch 2'
                                },
                                html: [
                                        "You've just generated a new Sencha Touch 2 project. What you're looking at right now is the ",
                                        "contents of <a target='_blank' href=\"app/view/Main.js\">app/view/Main.js</a> - edit that file ",
                                        "and refresh to change what's rendered here."
                                ].join("")
                        },
                        {
                                title: 'Blog',
                                iconCls: 'Star',
                                xtype: 'helloworld_blog'
                        },
                        {
                                title: 'Get Started',
                                iconCls: 'action',
                                items: [
                                        {
                                                docked: 'top',
                                                xtype: 'gps',
                                                title: 'Getting Started'

                                        },
                                        {
                                                id: 'btn1',
                                                xtype: 'button',
                                                text: 'Test',
                                                handler: function() {

                                                }
                                        },
                                        {
                                                xtype: 'video',
                                                url: 'http://av.vimeo.com/64284/137/87347327.mp4?token=1330978144_f9b698fea38cd408d52a2393240c896c',
                                                posterUrl: 'http://b.vimeocdn.com/ts/261/062/261062119_640.jpg'
                                        }
                                ]
                        },
                        {
                                xtype: 'nestedlist',
                                title: 'Image',
                                iconCls: 'star',
                                displayField: 'title',
                                store: {
                                        type: 'tree',
                                        fields: [
                                                'title', 'link', 'author', 'contentSnippet', 'content',
                                                {
                                                        name: 'leaf',
                                                        defaultValue: true
                                                }
                                        ],
                                        root: {
                                                leaf: false
                                        },
                                        proxy: {
                                                type: 'jsonp',
                                                url: 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://feeds.feedburner.com/SenchaBlog',
                                                reader: {
                                                        type: 'json',
                                                        rootProperty: 'responseData.feed.entries'
                                                }
                                        }
                                }
                        },
                        {
                                title: 'Contact',
                                iconCls: 'user',
                                xtype: 'formpanel',
                                url: 'contact.php',
                                layout: 'vbox',
                                items: [
                                        {
                                                docked: 'top',
                                                xtype: 'titlebar',
                                                title: 'Get Image'
                                        },
                                        {
                                                xtype: 'fieldset',
                                                title: 'Get Image',
                                                instructions: 'Please enter image url',
                                                height: 285,
                                                items: [
                                                        {
                                                                xtype: 'textfield',
                                                                label: 'URL'
                                                        }
                                                ]
                                        },
                                        {
                                                xtype: 'button',
                                                text: 'Send',
                                                ui: 'confirm',
                                                handler: function() {
                                                        this.up('formpanel').submit();
                                                }
                                        }
                                ]
                        }
                ]
        }
});
